package org.leaf.green.b2b

class RetailerInventoryDetail {

    RetailerInventory retailerInventory
    Product product
    BigDecimal quantity
    BigDecimal price
    BigDecimal amount

    static belongsTo = [retailerInventory : RetailerInventory]

    static constraints = {
        retailerInventory(nullable:false)
        product(nullable:false, unique : 'retailerInventory')
        quantity(nullable:false, scale : 2)
        price(nullable:false, scale : 2)
        amount(nullable:false, scale : 2)
    }

    static mapping = {
        table 'B2B_RETAILER_INVENTORY_DETAIL'
    }
}
